<%@page import="org.lxy.domain.RecycleGoodsEntity"%>
<%@page import="org.lxy.service.RecycleGoodsService"%>
<%@page import="org.lxy.service.UserInfoService"%>
<%@page import="org.lxy.domain.UserInfoEntity"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="org.lxy.utils.CoreUtils" %>
<%
	RecycleGoodsService recycleGoodsService = CoreUtils.recycleGoodsService;
	String id = request.getParameter("id");
	RecycleGoodsEntity entity = recycleGoodsService.getById(Integer.parseInt(id));

	String duihuanjifen = request.getParameter("duihuanjifen");
	entity.setChangePoints(Integer.parseInt(duihuanjifen));
	entity.setStatus("兑换中");
	recycleGoodsService.updateById(entity);
	out.write("<script>alert('操作成功!');window.parent.location.href='/recyclegoods/operation?op=List&type="
	+(entity.getRecycleMethod().equals("上门回收")?"1":"2")
			+ "';</script>");
%>